#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QMainWindow>
#include "csserial.h"
#include "console.h"
QT_BEGIN_NAMESPACE
namespace Ui { class MainWindow; }
QT_END_NAMESPACE

class MainWindow : public QMainWindow
{
    Q_OBJECT

public:
    MainWindow(QWidget *parent = nullptr);
    ~MainWindow();

    CSSerial serial_CMD;
private slots:
    void on_pb_CMD_clicked();

    void serial_CMD_read();
    void writeData(const QByteArray &data);
    void readData();
    void on_pushButton_clicked();
private:
    Ui::MainWindow *ui;
    Console *m_console = nullptr;
    QSerialPort *m_serial = nullptr;

    void login();
};
#endif // MAINWINDOW_H
